package com.aipartner.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * Wallet Transaction Entity
 * 
 * @author AI Partner Team
 * @since 2024-01-20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("wallet_transaction")
public class WalletTransaction {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @TableField("user_id")
    private Long userId;
    
    @TableField("transaction_no")
    private String transactionNo;
    
    @TableField("transaction_type")
    private Integer transactionType;
    
    @TableField("amount")
    private BigDecimal amount;
    
    @TableField("balance_before")
    private BigDecimal balanceBefore;
    
    @TableField("balance_after")
    private BigDecimal balanceAfter;
    
    @TableField("description")
    private String description;
    
    @TableField("related_order_id")
    private Long relatedOrderId;
    
    @TableField("status")
    private Integer status;
    
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}